home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Samples / SampleCode / MetafileRead / MetaFileReadSupport.h < prev   
Encoding:
Text File  |  1997-08-14  |  1.8 KB  |  57 lines  |  [TEXT/MPCC]

  1. // Quickdraw 3D sample code
  2. //
  3. // Nick Thompson, AppleLink: DEVSUPPORT (devsupport@applelink.apple.com)
  4. //
  5. // ©1994-5 Apple Computer Inc., All Rights Reserved
  6.  
  7. #ifndef _MY3DSUPPORT_H_
  8. #define _MY3DSUPPORT_H_
  9.  
  10. // Macintosh System Stuff
  11. #include <Files.h>
  12. #include <Types.h>
  13. #include <Windows.h>
  14.  
  15. // QuickDraw 3D stuff
  16. #include "QD3D.h"
  17. #include "QD3DGroup.h"
  18. #include "QD3DErrors.h"
  19. #include "QD3DView.h"
  20.  
  21. //-------------------------------------------------------------------------------------------
  22.  
  23. struct _documentRecord {
  24.     TQ3ViewObject    fView ;                    // the view for the scene
  25.     TQ3GroupObject    fModel ;                // object in the scene being modelled
  26.     TQ3StyleObject    fInterpolation ;        // interpolation style used when rendering
  27.     TQ3StyleObject    fBackFacing ;            // whether to draw shapes that face away from the camera
  28.     TQ3StyleObject    fFillStyle ;            // whether drawn as solid filled object or decomposed to components
  29.     TQ3Matrix4x4        fRotation;            // the transform for the model
  30.     TQ3Point3D        fGroupCenter ;            // the center of the group (for rotation) 
  31.     float            fGroupScale    ;            // scaling factor to apply before drawing
  32. };
  33.  
  34. typedef struct _documentRecord DocumentRec, *DocumentPtr, **DocumentHdl ;
  35.  
  36. //---------------------------------------------------------------------------------------
  37.  
  38. OSErr MyQD3DInitialize( void ) ;
  39. OSErr MyQD3DExit() ;
  40.  
  41. TQ3ViewObject        MyNewView(WindowPtr theWindow) ;
  42. TQ3DrawContextObject    MyNewDrawContext( WindowPtr theWindow) ;
  43. TQ3CameraObject        MyNewCamera(WindowPtr theWindow) ;
  44. TQ3GroupObject        MyNewLights(void) ;
  45. TQ3GroupObject        MyNewModelFromFile(FSSpec *theFileSpec) ;
  46. TQ3Status SubmitScene( DocumentPtr theDocument ) ;
  47.  
  48. TQ3Point3D AdjustCamera(
  49.     DocumentPtr            theDocument,
  50.     short                winWidth,
  51.     short                winHeight) ;
  52.     
  53. Boolean             MetafileFileSpecify( FSSpec *theFile ) ; 
  54. TQ3Status             MyReadModelFromFile( TQ3FileObject theFile,TQ3GroupObject myGroup) ;
  55.  
  56. #endif
  57.